

/**
 * 弱口令校验
 */
//  /g表示全局
function isContainNum(pwd){
	return pwd.match(/\d+/g)==null ? false : true;
}

function isContainLowChar(pwd){
	return pwd.match(/[a-z]+/g)==null ? false : true;
}

function isContainUpChar(pwd){
	return pwd.match(/[A-Z]+/g)==null ? false : true;
}

function isContainEspChar(pwd){
	return pwd.match(/[~!@#$%^&*()_=+]+/g)==null ? false : true;
}
//判断用户输入的密码是否是弱密码
export function checkPassword(password){
	// if(isContainNum(password)&&isContainLowChar(password)&&isContainUpChar(password)){
	// 	return true;
	// }else if(isContainNum(password)&&isContainLowChar(password)&&isContainEspChar(password)){
	// 	return true;
	// }else if(isContainNum(password)&&isContainUpChar(password)&&isContainEspChar(password)){
	// 	return true;
	// }else if(isContainLowChar(password)&&isContainUpChar(password)&&isContainEspChar(password)){
	// 	return true;
	// }else{
	// 	return false;
	// }

	if(isContainNum(password)&&isContainLowChar(password)&&isContainUpChar(password) &&isContainEspChar(password)){
		return true;
	}else{
		return false;
	}
}